#include "ds1302.h"
#include "public.h"
#include "smg.h"

void main()
{
    unsigned char time_buf[8];
    int arr[17] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
    //ds1302_init();
    while (1)
    {
        ds1302_read_time();
        time_buf[0] = arr[gDS1302_TIME[2]/16];
        time_buf[1] = arr[gDS1302_TIME[2]%16];
        time_buf[2] = 0x40;
        time_buf[3] = arr[gDS1302_TIME[1]/16];
        time_buf[4] = arr[gDS1302_TIME[1]%16];
        time_buf[5] = 0x40;
        time_buf[6] = arr[gDS1302_TIME[0]/16];
        time_buf[7] = arr[gDS1302_TIME[0]%16];
        smg_display(time_buf,1);
    }
    
   
}